package com.xbb.task;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.xbb.service.StatisticService;

@Component
@EnableScheduling
public class StatisticTask {

	@Autowired
	private StatisticService statisticService;
	
	@Scheduled(cron="0 31 16 ? * *")
	public void mytask() {
		statisticService.addStaInfo();
		System.out.println("定时任务执行了。。。");
	}
}
